<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Pod::Parser - base class for creating POD filters and translators - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Pod-Parser - MetaCPAN" href="https://metacpan.org/dist/Pod-Parser/releases.rss" />
        <link rel="canonical" href="./Pod::Parser.html" />
        <meta name="description" content="base class for creating POD filters and translators" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Pod::Parser" />
<meta name="twitter:title"       content="Pod::Parser" />
<meta name="twitter:description" content="base class for creating POD filters and translators" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Pod::Parser.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Pod-Parser was released.">
      <span class="relatize">03 Jan 2024 21:23:20 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Pod-Parser">Pod-Parser</a>
  </li>
  <li>
    Module version: 1.67
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Pod-Parser/source/lib/Pod/Parser.pm">Source</a>
    (<a href="https://metacpan.org/dist/Pod-Parser/source/lib/Pod/Parser.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Pod-Parser/source/lib/Pod">Browse</a>
    (<a href="https://metacpan.org/dist/Pod-Parser/source/lib/Pod?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Pod-Parser/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Pod-Parser/contribute">How to Contribute</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Pod-Parser">Issues</a>
      (0)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Pod-Parser+1.67" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/P/Pod-Parser.html?oncpan=1&amp;distmat=1&amp;version=1.67&amp;grade=2" style="color: #090">334</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/P/Pod-Parser.html?oncpan=1&amp;distmat=1&amp;version=1.67&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/P/Pod-Parser.html?oncpan=1&amp;distmat=1&amp;version=1.67&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/MAREKR/Pod-Parser-1.67">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Pod-Parser who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 5
      </div>
    </li>
    <li>
      License: unknown
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Pod-Parser/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.67.tar.gz">
      Download (<span itemprop="fileSize">79.06KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FMAREKR%2FPod-Parser-1.67%2Flib%2FPod%2FParser.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Pod-Parser/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Pod-Parser/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Pod-Parser">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Pod-Parser">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Pod/Parser.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="MAREKR/Pod-Parser-1.67"
>1.67
  (MAREKR on 2024-01-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.66"
>1.66
  (MAREKR on 2023-04-22)</option>
<option
  
  value="MAREKR/Pod-Parser-1.65"
>1.65
  (MAREKR on 2022-05-21)</option>
<option
  
  value="MAREKR/Pod-Parser-1.64"
>1.64
  (MAREKR on 2022-05-21)</option>
<option
  
  value="MAREKR/Pod-Parser-1.63"
>1.63
  (MAREKR on 2015-02-10)</option>
<option
  
  value="MAREKR/Pod-Parser-1.62"
>1.62
  (MAREKR on 2014-02-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.51"
>1.51
  (MAREKR on 2012-01-25)</option>
<option
  
  value="MAREKR/Pod-Parser-1.38"
>1.38
  (MAREKR on 2009-02-09)</option>
<optgroup label="BackPAN">'
<option
  
  value="MAREKR/Pod-Parser-1.61"
>1.61
  (MAREKR on 2013-06-01)</option>
<option
  
  value="MAREKR/Pod-Parser-1.60"
>1.60
  (MAREKR on 2013-02-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.50"
>1.50
  (MAREKR on 2012-01-22)</option>
<option
  
  value="MAREKR/Pod-Parser-1.37"
>1.37
  (MAREKR on 2009-02-04)</option>
<option
  
  value="MAREKR/Pod-Parser-1.36"
>1.36
  (MAREKR on 2009-01-20)</option>
<option
  
  value="MAREKR/Pod-Parser-1.35"
>1.35
  (MAREKR on 2006-10-26)</option>
<option
  
  value="MAREKR/Pod-Parser-1.34"
>1.34
  (MAREKR on 2005-10-06)</option>
<option
  
  value="MAREKR/Pod-Parser-1.33"
>1.33
  (MAREKR on 2005-09-05)</option>
<option
  
  value="MAREKR/Pod-Parser-1.32"
>1.32
  (MAREKR on 2005-06-15)</option>
<option
  
  value="MAREKR/Pod-Parser-1.31"
>1.31
  (MAREKR on 2005-06-01)</option>
<option
  
  value="MAREKR/Pod-Parser-1.30"
>1.30
  (MAREKR on 2005-03-13)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/MAREKR/Pod-Parser-1.67/diff/' + encodeURIComponent(this.value) + '/lib/Pod/Parser.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="MAREKR/Pod-Parser-1.67"
>1.67
  (MAREKR on 2024-01-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.66"
>1.66
  (MAREKR on 2023-04-22)</option>
<option
  
  value="MAREKR/Pod-Parser-1.65"
>1.65
  (MAREKR on 2022-05-21)</option>
<option
  
  value="MAREKR/Pod-Parser-1.64"
>1.64
  (MAREKR on 2022-05-21)</option>
<option
  
  value="MAREKR/Pod-Parser-1.63"
>1.63
  (MAREKR on 2015-02-10)</option>
<option
  
  value="MAREKR/Pod-Parser-1.62"
>1.62
  (MAREKR on 2014-02-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.51"
>1.51
  (MAREKR on 2012-01-25)</option>
<option
  
  value="MAREKR/Pod-Parser-1.38"
>1.38
  (MAREKR on 2009-02-09)</option>
<optgroup label="BackPAN">'
<option
  
  value="MAREKR/Pod-Parser-1.61"
>1.61
  (MAREKR on 2013-06-01)</option>
<option
  
  value="MAREKR/Pod-Parser-1.60"
>1.60
  (MAREKR on 2013-02-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.50"
>1.50
  (MAREKR on 2012-01-22)</option>
<option
  
  value="MAREKR/Pod-Parser-1.37"
>1.37
  (MAREKR on 2009-02-04)</option>
<option
  
  value="MAREKR/Pod-Parser-1.36"
>1.36
  (MAREKR on 2009-01-20)</option>
<option
  
  value="MAREKR/Pod-Parser-1.35"
>1.35
  (MAREKR on 2006-10-26)</option>
<option
  
  value="MAREKR/Pod-Parser-1.34"
>1.34
  (MAREKR on 2005-10-06)</option>
<option
  
  value="MAREKR/Pod-Parser-1.33"
>1.33
  (MAREKR on 2005-09-05)</option>
<option
  
  value="MAREKR/Pod-Parser-1.32"
>1.32
  (MAREKR on 2005-06-15)</option>
<option
  
  value="MAREKR/Pod-Parser-1.31"
>1.31
  (MAREKR on 2005-06-01)</option>
<option
  
  value="MAREKR/Pod-Parser-1.30"
>1.30
  (MAREKR on 2005-03-13)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Cwd" title="Cwd" class="ellipsis">Cwd</a></li>
  <li><a href="https://metacpan.org/pod/File::Basename" title="File::Basename" class="ellipsis">File::Basename</a></li>
  <li><a href="https://metacpan.org/pod/Test::More" title="Test::More" class="ellipsis">Test::More</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Pod::Parser/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Pod%3A%3AParser">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Pod-Parser">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/MAREKR/Pod-Parser-1.67/view/lib/Pod/Parser.pm">This version</a>
    </li>
    <li>
      <a href="./Pod::Parser.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/JMATES"><img src="https://www.gravatar.com/avatar/06accb84e6519284be3941ff72e429cb?d=identicon&amp;s=20" title="JMATES" alt="JMATES"></a>
<a class="display-all" href="https://metacpan.org/author/AZAWAWI"><img src="https://www.gravatar.com/avatar/70ebafdecf974e15bcaba4cbe39efef1?d=identicon&amp;s=20" title="AZAWAWI" alt="AZAWAWI"></a>
<a class="display-all" href="https://metacpan.org/author/YOUPONG"><img src="https://www.gravatar.com/avatar/45be30d66c5f5cb4d9ba25f35af52596?d=identicon&amp;s=20" title="YOUPONG" alt="YOUPONG"></a>
<a class="display-all" href="https://metacpan.org/author/XAV"><img src="https://www.gravatar.com/avatar/37f9cbd6749507cadc1df1efeec95771?d=identicon&amp;s=20" title="XAV" alt="XAV"></a>
<a class="display-all" href="https://metacpan.org/author/DOHERTY"><img src="https://www.gravatar.com/avatar/9533c36b6385c8321bad636c98e9c0a8?d=identicon&amp;s=20" title="DOHERTY" alt="DOHERTY"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Pod-Parser/plussers">7 PAUSE users</a>
</div>
<div>
    6 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-contrib-email="bradapp@enteract.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Brad Appleton, Marek Rouchal &lt;marekr@cpan.org&gt;
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/MAREKR" class="author-name">Marek Rouchal</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Pod/Parser.pm&#39;" class="">
<option
  selected
  value="MAREKR/Pod-Parser-1.67"
>1.67
  (MAREKR on 2024-01-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.66"
>1.66
  (MAREKR on 2023-04-22)</option>
<option
  
  value="MAREKR/Pod-Parser-1.65"
>1.65
  (MAREKR on 2022-05-21)</option>
<option
  
  value="MAREKR/Pod-Parser-1.64"
>1.64
  (MAREKR on 2022-05-21)</option>
<option
  
  value="MAREKR/Pod-Parser-1.63"
>1.63
  (MAREKR on 2015-02-10)</option>
<option
  
  value="MAREKR/Pod-Parser-1.62"
>1.62
  (MAREKR on 2014-02-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.51"
>1.51
  (MAREKR on 2012-01-25)</option>
<option
  
  value="MAREKR/Pod-Parser-1.38"
>1.38
  (MAREKR on 2009-02-09)</option>
<optgroup label="BackPAN">'
<option
  
  value="MAREKR/Pod-Parser-1.61"
>1.61
  (MAREKR on 2013-06-01)</option>
<option
  
  value="MAREKR/Pod-Parser-1.60"
>1.60
  (MAREKR on 2013-02-03)</option>
<option
  
  value="MAREKR/Pod-Parser-1.50"
>1.50
  (MAREKR on 2012-01-22)</option>
<option
  
  value="MAREKR/Pod-Parser-1.37"
>1.37
  (MAREKR on 2009-02-04)</option>
<option
  
  value="MAREKR/Pod-Parser-1.36"
>1.36
  (MAREKR on 2009-01-20)</option>
<option
  
  value="MAREKR/Pod-Parser-1.35"
>1.35
  (MAREKR on 2006-10-26)</option>
<option
  
  value="MAREKR/Pod-Parser-1.34"
>1.34
  (MAREKR on 2005-10-06)</option>
<option
  
  value="MAREKR/Pod-Parser-1.33"
>1.33
  (MAREKR on 2005-09-05)</option>
<option
  
  value="MAREKR/Pod-Parser-1.32"
>1.32
  (MAREKR on 2005-06-15)</option>
<option
  
  value="MAREKR/Pod-Parser-1.31"
>1.31
  (MAREKR on 2005-06-01)</option>
<option
  
  value="MAREKR/Pod-Parser-1.30"
>1.30
  (MAREKR on 2005-03-13)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Pod-Parser">Pod-Parser-1.67</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage four &#10;
          • 98 direct dependents &#10;          • 1275 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Pod-Parser-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Pod-Parser-1.67">
    <input type="hidden" name="author" value="MAREKR">
    <input type="hidden" name="distribution" value="Pod-Parser">
    <button type="submit" class="favorite highlight"><span>13</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Pod::Parser.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>13</span> ++</a>
</div>
   / <span>Pod::Parser</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Pod::Parser.html#NAME">NAME</a></li>
  <li><a href="./Pod::Parser.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Pod::Parser.html#REQUIRES">REQUIRES</a></li>
  <li><a href="./Pod::Parser.html#EXPORTS">EXPORTS</a></li>
  <li><a href="./Pod::Parser.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Pod::Parser.html#QUICK-OVERVIEW">QUICK OVERVIEW</a></li>
  <li><a href="./Pod::Parser.html#PARSING-OPTIONS">PARSING OPTIONS</a></li>
  <li><a href="./Pod::Parser.html#RECOMMENDED-SUBROUTINE/METHOD-OVERRIDES">RECOMMENDED SUBROUTINE/METHOD OVERRIDES</a></li>
  <li><a href="./Pod::Parser.html#command()">command()</a></li>
  <li><a href="./Pod::Parser.html#verbatim()">verbatim()</a></li>
  <li><a href="./Pod::Parser.html#textblock()">textblock()</a></li>
  <li><a href="./Pod::Parser.html#interior_sequence()">interior_sequence()</a></li>
  <li><a href="./Pod::Parser.html#OPTIONAL-SUBROUTINE/METHOD-OVERRIDES">OPTIONAL SUBROUTINE/METHOD OVERRIDES</a></li>
  <li><a href="./Pod::Parser.html#new()">new()</a></li>
  <li><a href="./Pod::Parser.html#initialize()">initialize()</a></li>
  <li><a href="./Pod::Parser.html#begin_pod()">begin_pod()</a></li>
  <li><a href="./Pod::Parser.html#begin_input()">begin_input()</a></li>
  <li><a href="./Pod::Parser.html#end_input()">end_input()</a></li>
  <li><a href="./Pod::Parser.html#end_pod()">end_pod()</a></li>
  <li><a href="./Pod::Parser.html#preprocess_line()">preprocess_line()</a></li>
  <li><a href="./Pod::Parser.html#preprocess_paragraph()">preprocess_paragraph()</a></li>
  <li><a href="./Pod::Parser.html#METHODS-FOR-PARSING-AND-PROCESSING">METHODS FOR PARSING AND PROCESSING</a></li>
  <li><a href="./Pod::Parser.html#parse_text()">parse_text()</a></li>
  <li><a href="./Pod::Parser.html#interpolate()">interpolate()</a></li>
  <li><a href="./Pod::Parser.html#parse_from_filehandle()">parse_from_filehandle()</a></li>
  <li><a href="./Pod::Parser.html#parse_from_file()">parse_from_file()</a></li>
  <li><a href="./Pod::Parser.html#ACCESSOR-METHODS">ACCESSOR METHODS</a></li>
  <li><a href="./Pod::Parser.html#errorsub()">errorsub()</a></li>
  <li><a href="./Pod::Parser.html#cutting()">cutting()</a></li>
  <li><a href="./Pod::Parser.html#parseopts()">parseopts()</a></li>
  <li><a href="./Pod::Parser.html#output_file()">output_file()</a></li>
  <li><a href="./Pod::Parser.html#output_handle()">output_handle()</a></li>
  <li><a href="./Pod::Parser.html#input_file()">input_file()</a></li>
  <li><a href="./Pod::Parser.html#input_handle()">input_handle()</a></li>
  <li><a href="./Pod::Parser.html#PRIVATE-METHODS-AND-DATA">PRIVATE METHODS AND DATA</a></li>
  <li><a href="./Pod::Parser.html#TREE-BASED-PARSING">TREE-BASED PARSING</a></li>
  <li><a href="./Pod::Parser.html#CAVEATS">CAVEATS</a></li>
  <li><a href="./Pod::Parser.html#SEE-ALSO">SEE ALSO</a></li>
  <li><a href="./Pod::Parser.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Pod::Parser.html#LICENSE">LICENSE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Pod::Parser - base class for creating POD filters and translators</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>    use Pod::Parser;

    package MyParser;
    @ISA = qw(Pod::Parser);

    sub command { 
        my ($parser, $command, $paragraph, $line_num) = @_;
        ## Interpret the command and its text; sample actions might be:
        if ($command eq &#39;head1&#39;) { ... }
        elsif ($command eq &#39;head2&#39;) { ... }
        ## ... other commands and their actions
        my $out_fh = $parser-&gt;output_handle();
        my $expansion = $parser-&gt;interpolate($paragraph, $line_num);
        print $out_fh $expansion;
    }

    sub verbatim { 
        my ($parser, $paragraph, $line_num) = @_;
        ## Format verbatim paragraph; sample actions might be:
        my $out_fh = $parser-&gt;output_handle();
        print $out_fh $paragraph;
    }

    sub textblock { 
        my ($parser, $paragraph, $line_num) = @_;
        ## Translate/Format this block of text; sample actions might be:
        my $out_fh = $parser-&gt;output_handle();
        my $expansion = $parser-&gt;interpolate($paragraph, $line_num);
        print $out_fh $expansion;
    }

    sub interior_sequence { 
        my ($parser, $seq_command, $seq_argument) = @_;
        ## Expand an interior sequence; sample actions might be:
        return &quot;*$seq_argument*&quot;     if ($seq_command eq &#39;B&#39;);
        return &quot;`$seq_argument&#39;&quot;     if ($seq_command eq &#39;C&#39;);
        return &quot;_${seq_argument}_&#39;&quot;  if ($seq_command eq &#39;I&#39;);
        ## ... other sequence commands and their resulting text
    }

    package main;

    ## Create a parser object and have it parse file whose name was
    ## given on the command-line (use STDIN if no files were given).
    $parser = new MyParser();
    $parser-&gt;parse_from_filehandle(\*STDIN)  if (@ARGV == 0);
    for (@ARGV) { $parser-&gt;parse_from_file($_); }</code></pre>

<h1 id="REQUIRES">REQUIRES</h1>

<p>perl5.005, Pod::InputObjects, Exporter, Symbol, Carp</p>

<h1 id="EXPORTS">EXPORTS</h1>

<p>Nothing.</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p><b>NOTE: This module is considered legacy; modern Perl releases (5.31.1 and higher) are going to remove Pod-Parser from core and use <a href="https://metacpan.org/pod/Pod::Simple">Pod::Simple</a> for all things POD.</b></p>

<p><b>Pod::Parser</b> is a base class for creating POD filters and translators. It handles most of the effort involved with parsing the POD sections from an input stream, leaving subclasses free to be concerned only with performing the actual translation of text.</p>

<p><b>Pod::Parser</b> parses PODs, and makes method calls to handle the various components of the POD. Subclasses of <b>Pod::Parser</b> override these methods to translate the POD into whatever output format they desire.</p>

<h1 id="QUICK-OVERVIEW"><a id="QUICK"></a>QUICK OVERVIEW</h1>

<p>To create a POD filter for translating POD documentation into some other format, you create a subclass of <b>Pod::Parser</b> which typically overrides just the base class implementation for the following methods:</p>

<ul>

<li><p><b>command()</b></p>

</li>
<li><p><b>verbatim()</b></p>

</li>
<li><p><b>textblock()</b></p>

</li>
<li><p><b>interior_sequence()</b></p>

</li>
</ul>

<p>You may also want to override the <b>begin_input()</b> and <b>end_input()</b> methods for your subclass (to perform any needed per-file and/or per-document initialization or cleanup).</p>

<p>If you need to perform any preprocessing of input before it is parsed you may want to override one or more of <b>preprocess_line()</b> and/or <b>preprocess_paragraph()</b>.</p>

<p>Sometimes it may be necessary to make more than one pass over the input files. If this is the case you have several options. You can make the first pass using <b>Pod::Parser</b> and override your methods to store the intermediate results in memory somewhere for the <b>end_pod()</b> method to process. You could use <b>Pod::Parser</b> for several passes with an appropriate state variable to control the operation for each pass. If your input source can&#39;t be reset to start at the beginning, you can store it in some other structure as a string or an array and have that structure implement a <b>getline()</b> method (which is all that <b>parse_from_filehandle()</b> uses to read input).</p>

<p>Feel free to add any member data fields you need to keep track of things like current font, indentation, horizontal or vertical position, or whatever else you like. Be sure to read <a href="./Pod::Parser.html#PRIVATE-METHODS-AND-DATA">&quot;PRIVATE METHODS AND DATA&quot;</a> to avoid name collisions.</p>

<p>For the most part, the <b>Pod::Parser</b> base class should be able to do most of the input parsing for you and leave you free to worry about how to interpret the commands and translate the result.</p>

<p>Note that all we have described here in this quick overview is the simplest most straightforward use of <b>Pod::Parser</b> to do stream-based parsing. It is also possible to use the <b>Pod::Parser::parse_text</b> function to do more sophisticated tree-based parsing. See <a href="./Pod::Parser.html#TREE-BASED-PARSING">&quot;TREE-BASED PARSING&quot;</a>.</p>

<h1 id="PARSING-OPTIONS"><a id="PARSING"></a>PARSING OPTIONS</h1>

<p>A <i>parse-option</i> is simply a named option of <b>Pod::Parser</b> with a value that corresponds to a certain specified behavior. These various behaviors of <b>Pod::Parser</b> may be enabled/disabled by setting or unsetting one or more <i>parse-options</i> using the <b>parseopts()</b> method. The set of currently accepted parse-options is as follows:</p>

<dl>

<dt id="-want_nonPODs-(default:-unset)"><a id="want_nonPODs--default:-unset"></a><b>-want_nonPODs</b> (default: unset)</dt>
<dd>

<p>Normally (by default) <b>Pod::Parser</b> will only provide access to the POD sections of the input. Input paragraphs that are not part of the POD-format documentation are not made available to the caller (not even using <b>preprocess_paragraph()</b>). Setting this option to a non-empty, non-zero value will allow <b>preprocess_paragraph()</b> to see non-POD sections of the input as well as POD sections. The <b>cutting()</b> method can be used to determine if the corresponding paragraph is a POD paragraph, or some other input paragraph.</p>

</dd>
<dt id="-process_cut_cmd-(default:-unset)"><a id="process_cut_cmd--default:-unset"></a><b>-process_cut_cmd</b> (default: unset)</dt>
<dd>

<p>Normally (by default) <b>Pod::Parser</b> handles the <code>=cut</code> POD directive by itself and does not pass it on to the caller for processing. Setting this option to a non-empty, non-zero value will cause <b>Pod::Parser</b> to pass the <code>=cut</code> directive to the caller just like any other POD command (and hence it may be processed by the <b>command()</b> method).</p>

<p><b>Pod::Parser</b> will still interpret the <code>=cut</code> directive to mean that &quot;cutting mode&quot; has been (re)entered, but the caller will get a chance to capture the actual <code>=cut</code> paragraph itself for whatever purpose it desires.</p>

</dd>
<dt id="-warnings-(default:-unset)"><a id="warnings--default:-unset"></a><b>-warnings</b> (default: unset)</dt>
<dd>

<p>Normally (by default) <b>Pod::Parser</b> recognizes a bare minimum of pod syntax errors and warnings and issues diagnostic messages for errors, but not for warnings. (Use <b>Pod::Checker</b> to do more thorough checking of POD syntax.) Setting this option to a non-empty, non-zero value will cause <b>Pod::Parser</b> to issue diagnostics for the few warnings it recognizes as well as the errors.</p>

</dd>
</dl>

<p>Please see <a href="./Pod::Parser.html#parseopts()">&quot;parseopts()&quot;</a> for a complete description of the interface for the setting and unsetting of parse-options.</p>

<h1 id="RECOMMENDED-SUBROUTINE/METHOD-OVERRIDES"><a id="RECOMMENDED"></a><a id="RECOMMENDED-SUBROUTINE-METHOD-OVERRIDES"></a>RECOMMENDED SUBROUTINE/METHOD OVERRIDES</h1>

<p><b>Pod::Parser</b> provides several methods which most subclasses will probably want to override. These methods are as follows:</p>

<h1 id="command()"><a id="command"></a><b>command()</b></h1>

<pre><code>            $parser-&gt;command($cmd,$text,$line_num,$pod_para);</code></pre>

<p>This method should be overridden by subclasses to take the appropriate action when a POD command paragraph (denoted by a line beginning with &quot;=&quot;) is encountered. When such a POD directive is seen in the input, this method is called and is passed:</p>

<dl>

<dt id="$cmd"><a id="cmd"></a><code>$cmd</code></dt>
<dd>

<p>the name of the command for this POD paragraph</p>

</dd>
<dt id="$text"><a id="text"></a><code>$text</code></dt>
<dd>

<p>the paragraph text for the given POD paragraph command.</p>

</dd>
<dt id="$line_num"><a id="line_num"></a><code>$line_num</code></dt>
<dd>

<p>the line-number of the beginning of the paragraph</p>

</dd>
<dt id="$pod_para"><a id="pod_para"></a><code>$pod_para</code></dt>
<dd>

<p>a reference to a <code>Pod::Paragraph</code> object which contains further information about the paragraph command (see <a href="./Pod::InputObjects.html">Pod::InputObjects</a> for details).</p>

</dd>
</dl>

<p><b>Note</b> that this method <i>is</i> called for <code>=pod</code> paragraphs.</p>

<p>The base class implementation of this method simply treats the raw POD command as normal block of paragraph text (invoking the <b>textblock()</b> method with the command paragraph).</p>

<h1 id="verbatim()"><a id="verbatim"></a><b>verbatim()</b></h1>

<pre><code>            $parser-&gt;verbatim($text,$line_num,$pod_para);</code></pre>

<p>This method may be overridden by subclasses to take the appropriate action when a block of verbatim text is encountered. It is passed the following parameters:</p>

<dl>

<dt id="$text1"><a id="text1"></a><code>$text</code></dt>
<dd>

<p>the block of text for the verbatim paragraph</p>

</dd>
<dt id="$line_num1"><a id="line_num1"></a><code>$line_num</code></dt>
<dd>

<p>the line-number of the beginning of the paragraph</p>

</dd>
<dt id="$pod_para1"><a id="pod_para1"></a><code>$pod_para</code></dt>
<dd>

<p>a reference to a <code>Pod::Paragraph</code> object which contains further information about the paragraph (see <a href="./Pod::InputObjects.html">Pod::InputObjects</a> for details).</p>

</dd>
</dl>

<p>The base class implementation of this method simply prints the textblock (unmodified) to the output filehandle.</p>

<h1 id="textblock()"><a id="textblock"></a><b>textblock()</b></h1>

<pre><code>            $parser-&gt;textblock($text,$line_num,$pod_para);</code></pre>

<p>This method may be overridden by subclasses to take the appropriate action when a normal block of POD text is encountered (although the base class method will usually do what you want). It is passed the following parameters:</p>

<dl>

<dt id="$text2"><a id="text2"></a><code>$text</code></dt>
<dd>

<p>the block of text for the a POD paragraph</p>

</dd>
<dt id="$line_num2"><a id="line_num2"></a><code>$line_num</code></dt>
<dd>

<p>the line-number of the beginning of the paragraph</p>

</dd>
<dt id="$pod_para2"><a id="pod_para2"></a><code>$pod_para</code></dt>
<dd>

<p>a reference to a <code>Pod::Paragraph</code> object which contains further information about the paragraph (see <a href="./Pod::InputObjects.html">Pod::InputObjects</a> for details).</p>

</dd>
</dl>

<p>In order to process interior sequences, subclasses implementations of this method will probably want to invoke either <b>interpolate()</b> or <b>parse_text()</b>, passing it the text block <code>$text</code>, and the corresponding line number in <code>$line_num</code>, and then perform any desired processing upon the returned result.</p>

<p>The base class implementation of this method simply prints the text block as it occurred in the input stream).</p>

<h1 id="interior_sequence()"><a id="interior_sequence"></a><b>interior_sequence()</b></h1>

<pre><code>            $parser-&gt;interior_sequence($seq_cmd,$seq_arg,$pod_seq);</code></pre>

<p>This method should be overridden by subclasses to take the appropriate action when an interior sequence is encountered. An interior sequence is an embedded command within a block of text which appears as a command name (usually a single uppercase character) followed immediately by a string of text which is enclosed in angle brackets. This method is passed the sequence command <code>$seq_cmd</code> and the corresponding text <code>$seq_arg</code>. It is invoked by the <b>interpolate()</b> method for each interior sequence that occurs in the string that it is passed. It should return the desired text string to be used in place of the interior sequence. The <code>$pod_seq</code> argument is a reference to a <code>Pod::InteriorSequence</code> object which contains further information about the interior sequence. Please see <a href="./Pod::InputObjects.html">Pod::InputObjects</a> for details if you need to access this additional information.</p>

<p>Subclass implementations of this method may wish to invoke the <b>nested()</b> method of <code>$pod_seq</code> to see if it is nested inside some other interior-sequence (and if so, which kind).</p>

<p>The base class implementation of the <b>interior_sequence()</b> method simply returns the raw text of the interior sequence (as it occurred in the input) to the caller.</p>

<h1 id="OPTIONAL-SUBROUTINE/METHOD-OVERRIDES"><a id="OPTIONAL"></a><a id="OPTIONAL-SUBROUTINE-METHOD-OVERRIDES"></a>OPTIONAL SUBROUTINE/METHOD OVERRIDES</h1>

<p><b>Pod::Parser</b> provides several methods which subclasses may want to override to perform any special pre/post-processing. These methods do <i>not</i> have to be overridden, but it may be useful for subclasses to take advantage of them.</p>

<h1 id="new()"><a id="new"></a><b>new()</b></h1>

<pre><code>            my $parser = Pod::Parser-&gt;new();</code></pre>

<p>This is the constructor for <b>Pod::Parser</b> and its subclasses. You <i>do not</i> need to override this method! It is capable of constructing subclass objects as well as base class objects, provided you use any of the following constructor invocation styles:</p>

<pre><code>    my $parser1 = MyParser-&gt;new();
    my $parser2 = new MyParser();
    my $parser3 = $parser2-&gt;new();</code></pre>

<p>where <code>MyParser</code> is some subclass of <b>Pod::Parser</b>.</p>

<p>Using the syntax <code>MyParser::new()</code> to invoke the constructor is <i>not</i> recommended, but if you insist on being able to do this, then the subclass <i>will</i> need to override the <b>new()</b> constructor method. If you do override the constructor, you <i>must</i> be sure to invoke the <b>initialize()</b> method of the newly blessed object.</p>

<p>Using any of the above invocations, the first argument to the constructor is always the corresponding package name (or object reference). No other arguments are required, but if desired, an associative array (or hash-table) my be passed to the <b>new()</b> constructor, as in:</p>

<pre><code>    my $parser1 = MyParser-&gt;new( MYDATA =&gt; $value1, MOREDATA =&gt; $value2 );
    my $parser2 = new MyParser( -myflag =&gt; 1 );</code></pre>

<p>All arguments passed to the <b>new()</b> constructor will be treated as key/value pairs in a hash-table. The newly constructed object will be initialized by copying the contents of the given hash-table (which may have been empty). The <b>new()</b> constructor for this class and all of its subclasses returns a blessed reference to the initialized object (hash-table).</p>

<h1 id="initialize()"><a id="initialize"></a><b>initialize()</b></h1>

<pre><code>            $parser-&gt;initialize();</code></pre>

<p>This method performs any necessary object initialization. It takes no arguments (other than the object instance of course, which is typically copied to a local variable named <code>$self</code>). If subclasses override this method then they <i>must</i> be sure to invoke <code>$self-&gt;SUPER::initialize()</code>.</p>

<h1 id="begin_pod()"><a id="begin_pod"></a><b>begin_pod()</b></h1>

<pre><code>            $parser-&gt;begin_pod();</code></pre>

<p>This method is invoked at the beginning of processing for each POD document that is encountered in the input. Subclasses should override this method to perform any per-document initialization.</p>

<h1 id="begin_input()"><a id="begin_input"></a><b>begin_input()</b></h1>

<pre><code>            $parser-&gt;begin_input();</code></pre>

<p>This method is invoked by <b>parse_from_filehandle()</b> immediately <i>before</i> processing input from a filehandle. The base class implementation does nothing, however, subclasses may override it to perform any per-file initializations.</p>

<p>Note that if multiple files are parsed for a single POD document (perhaps the result of some future <code>=include</code> directive) this method is invoked for every file that is parsed. If you wish to perform certain initializations once per document, then you should use <b>begin_pod()</b>.</p>

<h1 id="end_input()"><a id="end_input"></a><b>end_input()</b></h1>

<pre><code>            $parser-&gt;end_input();</code></pre>

<p>This method is invoked by <b>parse_from_filehandle()</b> immediately <i>after</i> processing input from a filehandle. The base class implementation does nothing, however, subclasses may override it to perform any per-file cleanup actions.</p>

<p>Please note that if multiple files are parsed for a single POD document (perhaps the result of some kind of <code>=include</code> directive) this method is invoked for every file that is parsed. If you wish to perform certain cleanup actions once per document, then you should use <b>end_pod()</b>.</p>

<h1 id="end_pod()"><a id="end_pod"></a><b>end_pod()</b></h1>

<pre><code>            $parser-&gt;end_pod();</code></pre>

<p>This method is invoked at the end of processing for each POD document that is encountered in the input. Subclasses should override this method to perform any per-document finalization.</p>

<h1 id="preprocess_line()"><a id="preprocess_line"></a><b>preprocess_line()</b></h1>

<pre><code>          $textline = $parser-&gt;preprocess_line($text, $line_num);</code></pre>

<p>This method should be overridden by subclasses that wish to perform any kind of preprocessing for each <i>line</i> of input (<i>before</i> it has been determined whether or not it is part of a POD paragraph). The parameter <code>$text</code> is the input line; and the parameter <code>$line_num</code> is the line number of the corresponding text line.</p>

<p>The value returned should correspond to the new text to use in its place. If the empty string or an undefined value is returned then no further processing will be performed for this line.</p>

<p>Please note that the <b>preprocess_line()</b> method is invoked <i>before</i> the <b>preprocess_paragraph()</b> method. After all (possibly preprocessed) lines in a paragraph have been assembled together and it has been determined that the paragraph is part of the POD documentation from one of the selected sections, then <b>preprocess_paragraph()</b> is invoked.</p>

<p>The base class implementation of this method returns the given text.</p>

<h1 id="preprocess_paragraph()"><a id="preprocess_paragraph"></a><b>preprocess_paragraph()</b></h1>

<pre><code>            $textblock = $parser-&gt;preprocess_paragraph($text, $line_num);</code></pre>

<p>This method should be overridden by subclasses that wish to perform any kind of preprocessing for each block (paragraph) of POD documentation that appears in the input stream. The parameter <code>$text</code> is the POD paragraph from the input file; and the parameter <code>$line_num</code> is the line number for the beginning of the corresponding paragraph.</p>

<p>The value returned should correspond to the new text to use in its place If the empty string is returned or an undefined value is returned, then the given <code>$text</code> is ignored (not processed).</p>

<p>This method is invoked after gathering up all the lines in a paragraph and after determining the cutting state of the paragraph, but before trying to further parse or interpret them. After <b>preprocess_paragraph()</b> returns, the current cutting state (which is returned by <code>$self-&gt;cutting()</code>) is examined. If it evaluates to true then input text (including the given <code>$text</code>) is cut (not processed) until the next POD directive is encountered.</p>

<p>Please note that the <b>preprocess_line()</b> method is invoked <i>before</i> the <b>preprocess_paragraph()</b> method. After all (possibly preprocessed) lines in a paragraph have been assembled together and either it has been determined that the paragraph is part of the POD documentation from one of the selected sections or the <code>-want_nonPODs</code> option is true, then <b>preprocess_paragraph()</b> is invoked.</p>

<p>The base class implementation of this method returns the given text.</p>

<h1 id="METHODS-FOR-PARSING-AND-PROCESSING"><a id="METHODS"></a>METHODS FOR PARSING AND PROCESSING</h1>

<p><b>Pod::Parser</b> provides several methods to process input text. These methods typically won&#39;t need to be overridden (and in some cases they can&#39;t be overridden), but subclasses may want to invoke them to exploit their functionality.</p>

<h1 id="parse_text()"><a id="parse_text"></a><b>parse_text()</b></h1>

<pre><code>            $ptree1 = $parser-&gt;parse_text($text, $line_num);
            $ptree2 = $parser-&gt;parse_text({%opts}, $text, $line_num);
            $ptree3 = $parser-&gt;parse_text(\%opts, $text, $line_num);</code></pre>

<p>This method is useful if you need to perform your own interpolation of interior sequences and can&#39;t rely upon <b>interpolate</b> to expand them in simple bottom-up order.</p>

<p>The parameter <code>$text</code> is a string or block of text to be parsed for interior sequences; and the parameter <code>$line_num</code> is the line number corresponding to the beginning of <code>$text</code>.</p>

<p><b>parse_text()</b> will parse the given text into a parse-tree of &quot;nodes.&quot; and interior-sequences. Each &quot;node&quot; in the parse tree is either a text-string, or a <b>Pod::InteriorSequence</b>. The result returned is a parse-tree of type <b>Pod::ParseTree</b>. Please see <a href="./Pod::InputObjects.html">Pod::InputObjects</a> for more information about <b>Pod::InteriorSequence</b> and <b>Pod::ParseTree</b>.</p>

<p>If desired, an optional hash-ref may be specified as the first argument to customize certain aspects of the parse-tree that is created and returned. The set of recognized option keywords are:</p>

<dl>

<dt id="-expand_seq-=&gt;-code-ref|method-name"><a id="expand_seq---code-ref-method-name"></a><b>-expand_seq</b> =&gt; <i>code-ref</i>|<i>method-name</i></dt>
<dd>

<p>Normally, the parse-tree returned by <b>parse_text()</b> will contain an unexpanded <code>Pod::InteriorSequence</code> object for each interior-sequence encountered. Specifying <b>-expand_seq</b> tells <b>parse_text()</b> to &quot;expand&quot; every interior-sequence it sees by invoking the referenced function (or named method of the parser object) and using the return value as the expanded result.</p>

<p>If a subroutine reference was given, it is invoked as:</p>

<pre><code>  &amp;$code_ref( $parser, $sequence )</code></pre>

<p>and if a method-name was given, it is invoked as:</p>

<pre><code>  $parser-&gt;method_name( $sequence )</code></pre>

<p>where <code>$parser</code> is a reference to the parser object, and <code>$sequence</code> is a reference to the interior-sequence object. [<i>NOTE</i>: If the <b>interior_sequence()</b> method is specified, then it is invoked according to the interface specified in <a href="./Pod::Parser.html#interior_sequence()">&quot;interior_sequence()&quot;</a>].</p>

</dd>
<dt id="-expand_text-=&gt;-code-ref|method-name"><a id="expand_text---code-ref-method-name"></a><b>-expand_text</b> =&gt; <i>code-ref</i>|<i>method-name</i></dt>
<dd>

<p>Normally, the parse-tree returned by <b>parse_text()</b> will contain a text-string for each contiguous sequence of characters outside of an interior-sequence. Specifying <b>-expand_text</b> tells <b>parse_text()</b> to &quot;preprocess&quot; every such text-string it sees by invoking the referenced function (or named method of the parser object) and using the return value as the preprocessed (or &quot;expanded&quot;) result. [Note that if the result is an interior-sequence, then it will <i>not</i> be expanded as specified by the <b>-expand_seq</b> option; Any such recursive expansion needs to be handled by the specified callback routine.]</p>

<p>If a subroutine reference was given, it is invoked as:</p>

<pre><code>  &amp;$code_ref( $parser, $text, $ptree_node )</code></pre>

<p>and if a method-name was given, it is invoked as:</p>

<pre><code>  $parser-&gt;method_name( $text, $ptree_node )</code></pre>

<p>where <code>$parser</code> is a reference to the parser object, <code>$text</code> is the text-string encountered, and <code>$ptree_node</code> is a reference to the current node in the parse-tree (usually an interior-sequence object or else the top-level node of the parse-tree).</p>

</dd>
<dt id="-expand_ptree-=&gt;-code-ref|method-name"><a id="expand_ptree---code-ref-method-name"></a><b>-expand_ptree</b> =&gt; <i>code-ref</i>|<i>method-name</i></dt>
<dd>

<p>Rather than returning a <code>Pod::ParseTree</code>, pass the parse-tree as an argument to the referenced subroutine (or named method of the parser object) and return the result instead of the parse-tree object.</p>

<p>If a subroutine reference was given, it is invoked as:</p>

<pre><code>  &amp;$code_ref( $parser, $ptree )</code></pre>

<p>and if a method-name was given, it is invoked as:</p>

<pre><code>  $parser-&gt;method_name( $ptree )</code></pre>

<p>where <code>$parser</code> is a reference to the parser object, and <code>$ptree</code> is a reference to the parse-tree object.</p>

</dd>
</dl>

<h1 id="interpolate()"><a id="interpolate"></a><b>interpolate()</b></h1>

<pre><code>            $textblock = $parser-&gt;interpolate($text, $line_num);</code></pre>

<p>This method translates all text (including any embedded interior sequences) in the given text string <code>$text</code> and returns the interpolated result. The parameter <code>$line_num</code> is the line number corresponding to the beginning of <code>$text</code>.</p>

<p><b>interpolate()</b> merely invokes a private method to recursively expand nested interior sequences in bottom-up order (innermost sequences are expanded first). If there is a need to expand nested sequences in some alternate order, use <b>parse_text</b> instead.</p>

<h1 id="parse_from_filehandle()"><a id="parse_from_filehandle"></a><b>parse_from_filehandle()</b></h1>

<pre><code>            $parser-&gt;parse_from_filehandle($in_fh,$out_fh);</code></pre>

<p>This method takes an input filehandle (which is assumed to already be opened for reading) and reads the entire input stream looking for blocks (paragraphs) of POD documentation to be processed. If no first argument is given the default input filehandle <code>STDIN</code> is used.</p>

<p>The <code>$in_fh</code> parameter may be any object that provides a <b>getline()</b> method to retrieve a single line of input text (hence, an appropriate wrapper object could be used to parse PODs from a single string or an array of strings).</p>

<p>Using <code>$in_fh-&gt;getline()</code>, input is read line-by-line and assembled into paragraphs or &quot;blocks&quot; (which are separated by lines containing nothing but whitespace). For each block of POD documentation encountered it will invoke a method to parse the given paragraph.</p>

<p>If a second argument is given then it should correspond to a filehandle where output should be sent (otherwise the default output filehandle is <code>STDOUT</code> if no output filehandle is currently in use).</p>

<p><b>NOTE:</b> For performance reasons, this method caches the input stream at the top of the stack in a local variable. Any attempts by clients to change the stack contents during processing when in the midst executing of this method <i>will not affect</i> the input stream used by the current invocation of this method.</p>

<p>This method does <i>not</i> usually need to be overridden by subclasses.</p>

<h1 id="parse_from_file()"><a id="parse_from_file"></a><b>parse_from_file()</b></h1>

<pre><code>            $parser-&gt;parse_from_file($filename,$outfile);</code></pre>

<p>This method takes a filename and does the following:</p>

<ul>

<li><p>opens the input and output files for reading (creating the appropriate filehandles)</p>

</li>
<li><p>invokes the <b>parse_from_filehandle()</b> method passing it the corresponding input and output filehandles.</p>

</li>
<li><p>closes the input and output files.</p>

</li>
</ul>

<p>If the special input filename &quot;&quot;, &quot;-&quot; or &quot;&lt;&amp;STDIN&quot; is given then the STDIN filehandle is used for input (and no open or close is performed). If no input filename is specified then &quot;-&quot; is implied. Filehandle references, or objects that support the regular IO operations (like <code>&lt;$fh&gt;</code> or <code>$fh-&lt;Egt</code>getline&gt;) are also accepted; the handles must already be opened.</p>

<p>If a second argument is given then it should be the name of the desired output file. If the special output filename &quot;-&quot; or &quot;&gt;&amp;STDOUT&quot; is given then the STDOUT filehandle is used for output (and no open or close is performed). If the special output filename &quot;&gt;&amp;STDERR&quot; is given then the STDERR filehandle is used for output (and no open or close is performed). If no output filehandle is currently in use and no output filename is specified, then &quot;-&quot; is implied. Alternatively, filehandle references or objects that support the regular IO operations (like <code>print</code>, e.g. <a href="./IO::String.html">IO::String</a>) are also accepted; the object must already be opened.</p>

<p>This method does <i>not</i> usually need to be overridden by subclasses.</p>

<h1 id="ACCESSOR-METHODS"><a id="ACCESSOR"></a>ACCESSOR METHODS</h1>

<p>Clients of <b>Pod::Parser</b> should use the following methods to access instance data fields:</p>

<h1 id="errorsub()"><a id="errorsub"></a><b>errorsub()</b></h1>

<pre><code>            $parser-&gt;errorsub(&quot;method_name&quot;);
            $parser-&gt;errorsub(\&amp;warn_user);
            $parser-&gt;errorsub(sub { print STDERR, @_ });</code></pre>

<p>Specifies the method or subroutine to use when printing error messages about POD syntax. The supplied method/subroutine <i>must</i> return TRUE upon successful printing of the message. If <code>undef</code> is given, then the <b>carp</b> builtin is used to issue error messages (this is the default behavior).</p>

<pre><code>            my $errorsub = $parser-&gt;errorsub()
            my $errmsg = &quot;This is an error message!\n&quot;
            (ref $errorsub) and &amp;{$errorsub}($errmsg)
                or (defined $errorsub) and $parser-&gt;$errorsub($errmsg)
                    or  carp($errmsg);</code></pre>

<p>Returns a method name, or else a reference to the user-supplied subroutine used to print error messages. Returns <code>undef</code> if the <b>carp</b> builtin is used to issue error messages (this is the default behavior).</p>

<h1 id="cutting()"><a id="cutting"></a><b>cutting()</b></h1>

<pre><code>            $boolean = $parser-&gt;cutting();</code></pre>

<p>Returns the current <code>cutting</code> state: a boolean-valued scalar which evaluates to true if text from the input file is currently being &quot;cut&quot; (meaning it is <i>not</i> considered part of the POD document).</p>

<pre><code>            $parser-&gt;cutting($boolean);</code></pre>

<p>Sets the current <code>cutting</code> state to the given value and returns the result.</p>

<h1 id="parseopts()"><a id="parseopts"></a><b>parseopts()</b></h1>

<p>When invoked with no additional arguments, <b>parseopts</b> returns a hashtable of all the current parsing options.</p>

<pre><code>            ## See if we are parsing non-POD sections as well as POD ones
            my %opts = $parser-&gt;parseopts();
            $opts{&#39;-want_nonPODs}&#39; and print &quot;-want_nonPODs\n&quot;;</code></pre>

<p>When invoked using a single string, <b>parseopts</b> treats the string as the name of a parse-option and returns its corresponding value if it exists (returns <code>undef</code> if it doesn&#39;t).</p>

<pre><code>            ## Did we ask to see &#39;=cut&#39; paragraphs?
            my $want_cut = $parser-&gt;parseopts(&#39;-process_cut_cmd&#39;);
            $want_cut and print &quot;-process_cut_cmd\n&quot;;</code></pre>

<p>When invoked with multiple arguments, <b>parseopts</b> treats them as key/value pairs and the specified parse-option names are set to the given values. Any unspecified parse-options are unaffected.</p>

<pre><code>            ## Set them back to the default
            $parser-&gt;parseopts(-warnings =&gt; 0);</code></pre>

<p>When passed a single hash-ref, <b>parseopts</b> uses that hash to completely reset the existing parse-options, all previous parse-option values are lost.</p>

<pre><code>            ## Reset all options to default 
            $parser-&gt;parseopts( { } );</code></pre>

<p>See <a href="./Pod::Parser.html#PARSING-OPTIONS">&quot;PARSING OPTIONS&quot;</a> for more information on the name and meaning of each parse-option currently recognized.</p>

<h1 id="output_file()"><a id="output_file"></a><b>output_file()</b></h1>

<pre><code>            $fname = $parser-&gt;output_file();</code></pre>

<p>Returns the name of the output file being written.</p>

<h1 id="output_handle()"><a id="output_handle"></a><b>output_handle()</b></h1>

<pre><code>            $fhandle = $parser-&gt;output_handle();</code></pre>

<p>Returns the output filehandle object.</p>

<h1 id="input_file()"><a id="input_file"></a><b>input_file()</b></h1>

<pre><code>            $fname = $parser-&gt;input_file();</code></pre>

<p>Returns the name of the input file being read.</p>

<h1 id="input_handle()"><a id="input_handle"></a><b>input_handle()</b></h1>

<pre><code>            $fhandle = $parser-&gt;input_handle();</code></pre>

<p>Returns the current input filehandle object.</p>

<h1 id="PRIVATE-METHODS-AND-DATA"><a id="PRIVATE"></a>PRIVATE METHODS AND DATA</h1>

<p><b>Pod::Parser</b> makes use of several internal methods and data fields which clients should not need to see or use. For the sake of avoiding name collisions for client data and methods, these methods and fields are briefly discussed here. Determined hackers may obtain further information about them by reading the <b>Pod::Parser</b> source code.</p>

<p>Private data fields are stored in the hash-object whose reference is returned by the <b>new()</b> constructor for this class. The names of all private methods and data-fields used by <b>Pod::Parser</b> begin with a prefix of &quot;_&quot; and match the regular expression <code>/^_\w+$/</code>.</p>

<h1 id="TREE-BASED-PARSING"><a id="TREE"></a>TREE-BASED PARSING</h1>

<p>If straightforward stream-based parsing wont meet your needs (as is likely the case for tasks such as translating PODs into structured markup languages like HTML and XML) then you may need to take the tree-based approach. Rather than doing everything in one pass and calling the <b>interpolate()</b> method to expand sequences into text, it may be desirable to instead create a parse-tree using the <b>parse_text()</b> method to return a tree-like structure which may contain an ordered list of children (each of which may be a text-string, or a similar tree-like structure).</p>

<p>Pay special attention to <a href="./Pod::Parser.html#METHODS-FOR-PARSING-AND-PROCESSING">&quot;METHODS FOR PARSING AND PROCESSING&quot;</a> and to the objects described in <a href="./Pod::InputObjects.html">Pod::InputObjects</a>. The former describes the gory details and parameters for how to customize and extend the parsing behavior of <b>Pod::Parser</b>. <b>Pod::InputObjects</b> provides several objects that may all be used interchangeably as parse-trees. The most obvious one is the <b>Pod::ParseTree</b> object. It defines the basic interface and functionality that all things trying to be a POD parse-tree should do. A <b>Pod::ParseTree</b> is defined such that each &quot;node&quot; may be a text-string, or a reference to another parse-tree. Each <b>Pod::Paragraph</b> object and each <b>Pod::InteriorSequence</b> object also supports the basic parse-tree interface.</p>

<p>The <b>parse_text()</b> method takes a given paragraph of text, and returns a parse-tree that contains one or more children, each of which may be a text-string, or an InteriorSequence object. There are also callback-options that may be passed to <b>parse_text()</b> to customize the way it expands or transforms interior-sequences, as well as the returned result. These callbacks can be used to create a parse-tree with custom-made objects (which may or may not support the parse-tree interface, depending on how you choose to do it).</p>

<p>If you wish to turn an entire POD document into a parse-tree, that process is fairly straightforward. The <b>parse_text()</b> method is the key to doing this successfully. Every paragraph-callback (i.e. the polymorphic methods for <b>command()</b>, <b>verbatim()</b>, and <b>textblock()</b> paragraphs) takes a <b>Pod::Paragraph</b> object as an argument. Each paragraph object has a <b>parse_tree()</b> method that can be used to get or set a corresponding parse-tree. So for each of those paragraph-callback methods, simply call <b>parse_text()</b> with the options you desire, and then use the returned parse-tree to assign to the given paragraph object.</p>

<p>That gives you a parse-tree for each paragraph - so now all you need is an ordered list of paragraphs. You can maintain that yourself as a data element in the object/hash. The most straightforward way would be simply to use an array-ref, with the desired set of custom &quot;options&quot; for each invocation of <b>parse_text</b>. Let&#39;s assume the desired option-set is given by the hash <code>%options</code>. Then we might do something like the following:</p>

<pre><code>    package MyPodParserTree;

    @ISA = qw( Pod::Parser );

    ...

    sub begin_pod {
        my $self = shift;
        $self-&gt;{&#39;-paragraphs&#39;} = [];  ## initialize paragraph list
    }

    sub command { 
        my ($parser, $command, $paragraph, $line_num, $pod_para) = @_;
        my $ptree = $parser-&gt;parse_text({%options}, $paragraph, ...);
        $pod_para-&gt;parse_tree( $ptree );
        push @{ $self-&gt;{&#39;-paragraphs&#39;} }, $pod_para;
    }

    sub verbatim { 
        my ($parser, $paragraph, $line_num, $pod_para) = @_;
        push @{ $self-&gt;{&#39;-paragraphs&#39;} }, $pod_para;
    }

    sub textblock { 
        my ($parser, $paragraph, $line_num, $pod_para) = @_;
        my $ptree = $parser-&gt;parse_text({%options}, $paragraph, ...);
        $pod_para-&gt;parse_tree( $ptree );
        push @{ $self-&gt;{&#39;-paragraphs&#39;} }, $pod_para;
    }

    ...

    package main;
    ...
    my $parser = new MyPodParserTree(...);
    $parser-&gt;parse_from_file(...);
    my $paragraphs_ref = $parser-&gt;{&#39;-paragraphs&#39;};</code></pre>

<p>Of course, in this module-author&#39;s humble opinion, I&#39;d be more inclined to use the existing <b>Pod::ParseTree</b> object than a simple array. That way everything in it, paragraphs and sequences, all respond to the same core interface for all parse-tree nodes. The result would look something like:</p>

<pre><code>    package MyPodParserTree2;

    ...

    sub begin_pod {
        my $self = shift;
        $self-&gt;{&#39;-ptree&#39;} = new Pod::ParseTree;  ## initialize parse-tree
    }

    sub parse_tree {
        ## convenience method to get/set the parse-tree for the entire POD
        (@_ &gt; 1)  and  $_[0]-&gt;{&#39;-ptree&#39;} = $_[1];
        return $_[0]-&gt;{&#39;-ptree&#39;};
    }

    sub command { 
        my ($parser, $command, $paragraph, $line_num, $pod_para) = @_;
        my $ptree = $parser-&gt;parse_text({&lt;&lt;options&gt;&gt;}, $paragraph, ...);
        $pod_para-&gt;parse_tree( $ptree );
        $parser-&gt;parse_tree()-&gt;append( $pod_para );
    }

    sub verbatim { 
        my ($parser, $paragraph, $line_num, $pod_para) = @_;
        $parser-&gt;parse_tree()-&gt;append( $pod_para );
    }

    sub textblock { 
        my ($parser, $paragraph, $line_num, $pod_para) = @_;
        my $ptree = $parser-&gt;parse_text({&lt;&lt;options&gt;&gt;}, $paragraph, ...);
        $pod_para-&gt;parse_tree( $ptree );
        $parser-&gt;parse_tree()-&gt;append( $pod_para );
    }

    ...

    package main;
    ...
    my $parser = new MyPodParserTree2(...);
    $parser-&gt;parse_from_file(...);
    my $ptree = $parser-&gt;parse_tree;
    ...</code></pre>

<p>Now you have the entire POD document as one great big parse-tree. You can even use the <b>-expand_seq</b> option to <b>parse_text</b> to insert whole different kinds of objects. Just don&#39;t expect <b>Pod::Parser</b> to know what to do with them after that. That will need to be in your code. Or, alternatively, you can insert any object you like so long as it conforms to the <b>Pod::ParseTree</b> interface.</p>

<p>One could use this to create subclasses of <b>Pod::Paragraphs</b> and <b>Pod::InteriorSequences</b> for specific commands (or to create your own custom node-types in the parse-tree) and add some kind of <b>emit()</b> method to each custom node/subclass object in the tree. Then all you&#39;d need to do is recursively walk the tree in the desired order, processing the children (most likely from left to right) by formatting them if they are text-strings, or by calling their <b>emit()</b> method if they are objects/references.</p>

<h1 id="CAVEATS">CAVEATS</h1>

<p>Please note that POD has the notion of &quot;paragraphs&quot;: this is something starting <i>after</i> a blank (read: empty) line, with the single exception of the file start, which is also starting a paragraph. That means that especially a command (e.g. <code>=head1</code>) <i>must</i> be preceded with a blank line; <code>__END__</code> is <i>not</i> a blank line.</p>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<p><a href="./Pod::InputObjects.html">Pod::InputObjects</a>, <a href="./Pod::Select.html">Pod::Select</a></p>

<p><b>Pod::InputObjects</b> defines POD input objects corresponding to command paragraphs, parse-trees, and interior-sequences.</p>

<p><b>Pod::Select</b> is a subclass of <b>Pod::Parser</b> which provides the ability to selectively include and/or exclude sections of a POD document from being translated based upon the current heading, subheading, subsubheading, etc.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Please report bugs using <a href="http://rt.cpan.org">http://rt.cpan.org</a>.</p>

<p>Brad Appleton &lt;bradapp@enteract.com&gt;</p>

<p>Based on code for <b>Pod::Text</b> written by Tom Christiansen &lt;tchrist@mox.perl.com&gt;</p>

<h1 id="LICENSE">LICENSE</h1>

<p>Pod-Parser is free software; you can redistribute it and/or modify it under the terms of the Artistic License distributed with Perl version 5.000 or (at your option) any later version. Please refer to the Artistic License that came with your Perl distribution for more details. If your version of Perl was not distributed under the terms of the Artistic License, than you may distribute PodParser under the same terms as Perl itself.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Pod::Parser, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Pod::Parser</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Pod::Parser</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Pod::Parser.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
